->!ReadMe

                            Function Key Handler
                            ====================

This disk contains a function key handler which allows the function keys to
be defined and activated within the RISC OS environment.

The contents of this disc, are as follows;

!ReadMe       This file.
!Boot         Keys !Boot file.
!Run          Keys !Run file.
!RunImage     Keys code.
!RunMe        Display !ReadMe file.
!Help         Help text file
!Sprites      Directory of sprite files for the Keys application.
Templates     Window templates.
StdKeyDef     Default Key definitions called up by !Run file.
Modules       Module directory containing :
  Clib        The Shared C Library module from the RISC OS !System folder.

Memory Requirements
===================

Module Area   Sufficient for Clib
Program Area  96K

Getting Started
===============

To copy this application onto another disc or install it on the hard disc
open a directory viewer on the destination disc within the RISC OS Desktop
and drag the !Keys icon to the destination directory.

The function key handler may be installed on the iconbar by double clicking
on the !Keys application icon.

The function keys are then active.

The function keys may then be displayed just above the icon bar by selection
of the Keys icon on the iconbar.

The keys application is controlled by the keys menu accessed by pressing the
menu button while the mouse pointer is over the Keys iconbar icon.

The function of the menu options is as follows:

  Info provides current information about the application.

  Define opens a dialogue window allowing the operation of any of the 
  function keys F1 to F12 to be defined.

  Show controls the display of the function keys just above the iconbar.
  This allows the function key to be operated by selecting the displayed
  key as well as pressing the keyboard key. A tick indicates the state of
  the function keys display.

  Save allows the current key definitions to be saved to a file using the
  standard 'Save as:' convention used by RISC OS applications.

  *Command opens a dialogue window allowing the entry of a * command.

  Quit removes the !Keys application from the Task memory.

Detailed Operation
==================

If a function key has been defined then it will always be operated on
selection of the displayed key.

If a window has the input focus then keyboard functions keys may be handled
directly by the corresponding application, e.g. Edit.  Function keys not
recognised by the application should be passed on and subsequently processed
by the function key handler.

If a function key is not defined the key code will be passed on to the wimp.
In this case the function key may have a name, e.g. selecting F12, which has
the name *, will allow the input of *commands below the iconbar.

Key Definition Files
====================

The definition of the function keys may be specified by creating a KeyDefs
file, this has the following format.

  Each key definition appears on a separate line.

  The definition is introduced by the command 'key'

  The function key number appears in columns 5 and 6.

  The name assigned to the function key appears in columns 8 to 12 and may
  be no more than 5 characters long. This name appears on the function key
  displayed above the iconbar.

  The operation assigned to the function key is a string on no more than 75
  characters starting in column 14.  

An example of this format can be seen in StdKeyDefs.

The definition of the function keys may also be specified by using the
Define menu option and the saved to a KeyDefs file by using the Save menu
option. This automatically produces the correct format for the KeyDefs file.

File Types
==========

As distibuted the !Boot file defines the file type for KeyDefs as 701 and
sets up a run type alias for this file type.

The file type for KeyDefs may be set to any legal type the user requires.
However a file type for KeyDefs must be set for correct operation of the
!Keys application.

Limitations
===========

Only the Function Keys F1 to F12 can be defined.

Function Keys modified by the Control or Shift keys are not handled.

Operation with a multisync monitor has not been checked.


*Command Entry
==============

*Commands may be entered using the *command dialogue box. If no window has
the input focus, i.e. contains the caret, then the *command dialogue box
will be displayed on entry of the first character of the required command.
Otherwise the dialogue box can be opened using the *command entry in
the Keys icon menu.

The dialogue box will accept a command string of up to 255 characters.

The dialogue box provides full editing features for the entered string, as
follows:

  Delete      delete character to the left of caret.
  Copy        delete character to the left of caret.
  <-          move caret left one character.
  ->          move caret right one character.
  Shift Copy  delete word (forwards).
  Shift <-    move left one word.
  Shift ->    move right one word.
  Ctrl Copy   delete to end of line (forwards).
  Ctrl <-     move to left end of line.
  Ctrl ->     move to right end of line.

The entered command can be aborted by selecting the CANCEL icon.

The *command is actioned by selecting the OK icon or pressing the <CR> key.
Any output text is displayed within a mode 4 window.
 
======

Release 1.01 February 1990

(c) Copyright Peter Tuson 1990

======

If you find this program useful or interesting a donation of 2 sterling,
sent to the address below, would be much appreciated. This will give me some
incentive to distribute future programs that I may write.

This program will be upgraded in the future, improvements may include;
command output to scrollable transcript window, support for shift and control
for function keys, and a history mechanism for *command entry. 

If you have any comments, suggestions, bug reports or complaints, please
write to the following address. This does not constitute a commitment
to correct reported bugs.

Dr. P.R.Tuson
70, Connaught Road
Fleet
Hants.
GU13 9QY
United Kingdom.
